package Demo4;

import java.util.ArrayList;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 洪汤泽大帅哥
 * Date: 2024-12-22
 * Time: 20:19
 */
public class Main {
    public static void main(String[] args) {
        ArrayList<Integer> list=new ArrayList<Integer>();
        Scanner scan=new Scanner(System.in);
        int n=scan.nextInt();
        for(int i=1;i<=n;i++) {
            list.add(scan.nextInt());
        }

        Integer max = 0;
        Integer min = 200;

        for (int i = 0; i < list.size(); i++) {
            if (list.get(i)>max){
                max = list.get(i);
            }
            if (list.get(i)<min){
                min = list.get(i);
            }
        }
        System.out.println("数列是："+list);
        /* 请在这里填写答案 */

        System.out.println("数列中最大的数是:"+max) ;
        System.out.println("数列中最小的数是:"+min) ;
    }
}
